<?php
use common\service\StaticService;
use backend\assets\AdminAsset;
use common\service\GlobalUrlService;
$this->title = '添加商铺';

StaticService::includeAppJsStatic(GlobalUrlService::buildStaticUrl('/backend/qiniu.min.js'),AdminAsset::class);
StaticService::includeAppJsStatic(GlobalUrlService::buildStaticUrl('/backend/shop/add-shop.js'),AdminAsset::class);
?>

<form class="layui-form">
    <div class="layui-card">
        <div class="layui-card-header">添加商家</div>
        <div class="layui-card-body">
            <div class="layui-form-item">
                <h2>店铺基本信息</h2>
                <!-- <div class="layui-inline"></div> -->
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">店铺名称</label>
                <div class="layui-inline">
                    <input type="text" class="layui-input input1" name="shop_name">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">登录账号</label>
                <div class="layui-inline">
                    <input type="text" class="layui-input input2" name="user_account">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">登录密码</label>
                <div class="layui-inline">
                    <input type="text" class="layui-input input3" name="password">
                </div>
            </div>
            <div class="layui-form-item">
                <h2>店铺管理人基本信息</h2>
                <!-- <div class="layui-inline"></div> -->
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">店铺管理人姓名</label>
                <div class="layui-inline">
                    <input type="text" class="layui-input input4" name="administration">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">店铺管理人邮箱</label>
                <div class="layui-inline">
                    <input type="text" class="layui-input input5" name="admin_email">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">店铺管理人手机号</label>
                <div class="layui-inline">
                    <input type="text" class="layui-input shop-phone input6" name="admin_phone">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">验证码</label>
                <div class="layui-inline">
                    <input type="text" class="layui-input layui-input-inline w20 input7" name="code">
                    <input class="layui-btn layui-btn-normal w25 getchecknum" value="获取验证码" type="button">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">店铺管理人身份证号</label>
                <div class="layui-inline">
                    <input type="text" class="layui-input input8" name="join_card_no">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">商家客服电话</label>
                <div class="layui-inline">
                    <input type="text" class="layui-input input9" name="customer_phone">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">管理人身份证正面照片</label>
                <div class="layui-inline">
                    <label class="layui-form-label label-pic" for="pic-card1">选择图片</label>
                    <input type="file" id="pic-card1" class="pic-card1" style="display:none;">
                    <div class="p40">
                        <label for="pic-card1">
                            <img src="" alt="" class="pic pic1">
                            <img src="<?= GlobalUrlService::buildStaticUrl('img/add-pic.png')?>" alt="" class="default default1">
                        </label>
                        <span>示例: </span>
                        <img src="<?= GlobalUrlService::buildStaticUrl('img/front.png')?>" alt="">
                        <input type="hidden" value="" class="hidden-pic1" name="join_card1_pic">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">管理人身份证反面照片</label>
                <div class="layui-inline">
                    <label class="layui-form-label label-pic" for="pic-card2">选择图片</label>
                    <input type="file" id="pic-card2" class="pic-card2" style="display:none;">
                    <div class="p40">
                        <label for="pic-card2">
                            <img src="" alt="" class="pic pic2">
                            <img src="<?= GlobalUrlService::buildStaticUrl('img/add-pic.png')?>" alt="" class="default default2">
                        </label>
                        <span>示例: </span>
                        <img src="<?= GlobalUrlService::buildStaticUrl('img/reverse.jpg')?>" alt="">
                        <input type="hidden" value="" class="hidden-pic2" name="join_card2_pic">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">管理人手持身份证照片</label>
                <div class="layui-inline">
                    <label class="layui-form-label label-pic" for="pic-card3">选择图片</label>
                    <input type="file" id="pic-card3" class="pic-card3" style="display:none;">
                    <div class="p40">
                        <label for="pic-card3">
                            <img src="" alt="" class="pic pic3">
                            <img src="<?= GlobalUrlService::buildStaticUrl('img/add-pic.png')?>" alt="" class="default default3">
                        </label>
                        <span>示例: </span>
                        <img src="<?= GlobalUrlService::buildStaticUrl('img/handheld.jpg')?>" alt="" style="width:278px;height:178px;">
                        <input type="hidden" value="" class="hidden-pic3" name="join_card3_pic">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <a class="layui-btn add-shop">确认</a>
                    <a class="layui-btn layui-btn-primary" onclick="window.history.go(-1);">取消</a>
                </div>
            </div>
        </div>
    </div>
</form>

<style>
    .layui-form-label{width:140px;}
    .p40{padding-top:45px;}
    .pic{width:270px;height:170px;display:none;}
    .default{width:170px;height:170px;}
    .label-pic{text-align:center;border:1px solid #ccc;width:80px;cursor:pointer;}
    .layui-inline .w20{width:80px;}
    .layui-inline .w25{font-size:12px;padding:0 10px;width:92px;}
</style>
